CC=gcc
CFLAGS=-std=c99 -Wall -Werror

SOURCES=main.c greet.c
OBJECTS=$(SOURCES:.c=.o)

.PHONY: all
all: main

.PHONY: clean
clean:
	rm -f $(OBJECTS)
	rm -f main

%.o: %.c
	$(CC) -c $(CFLAGS) $< -o $@

main: $(OBJECTS)
	$(CC) -o main $(OBJECTS)
